package bean;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * Tag entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tag", catalog = "es_knowledge_base")
public class Tag implements java.io.Serializable {

	// Fields

	private Integer tagId;
	private String tagName;
	private Integer belongTo;

	// Constructors

	/** default constructor */
	public Tag() {
	}

	/** full constructor */
	public Tag(String tagName, Integer belongTo) {
		this.tagName = tagName;
		this.belongTo = belongTo;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "tag_id", unique = true, nullable = false)
	public Integer getTagId() {
		return this.tagId;
	}

	public void setTagId(Integer tagId) {
		this.tagId = tagId;
	}

	@Column(name = "tag_name", nullable = false, length = 45)
	public String getTagName() {
		return this.tagName;
	}

	public void setTagName(String tagName) {
		this.tagName = tagName;
	}

	@Column(name = "belong_to", nullable = false)
	public Integer getBelongTo() {
		return this.belongTo;
	}

	public void setBelongTo(Integer belongTo) {
		this.belongTo = belongTo;
	}

}